package cn.com.huzo.model.entities.master;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 材料组成员用户实体类
 *
 * @author 吴旭
 */
public class MaterialGroupMemberUserEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -7408313633519623039L;
    private Long EmployeeId;             // 用户标识
    private Long MaterialGroupId;        // 所在材料组标识
    private String MaterialGroupName;    // 所在材料组名
    private String EmployeeName;         // 用户名
    private String DepartmentName;       // 所属部门

    public String getDepartmentName() {
        return DepartmentName;
    }

    public void setDepartmentName(String DepartmentName) {
        this.DepartmentName = DepartmentName;
    }

    public Long getEmployeeId() {
        return EmployeeId;
    }

    public void setEmployeeId(Long EmployeeId) {
        this.EmployeeId = EmployeeId;
    }

    public Long getMaterialGroupId() {
        return MaterialGroupId;
    }

    public void setMaterialGroupId(Long MaterialGroupId) {
        this.MaterialGroupId = MaterialGroupId;
    }

    public String getMaterialGroupName() {
        return MaterialGroupName;
    }

    public void setMaterialGroupName(String MaterialGroupName) {
        this.MaterialGroupName = MaterialGroupName;
    }

    public String getEmployeeName() {
        return EmployeeName;
    }

    public void setEmployeeName(String EmployeeName) {
        this.EmployeeName = EmployeeName;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof MaterialGroupMemberUserEntity)) {
            return false;
        }

        final MaterialGroupMemberUserEntity that = (MaterialGroupMemberUserEntity) o;

        return new EqualsBuilder()
                .append(this.getEmployeeId(), that.getEmployeeId())
                .append(this.getMaterialGroupId(), that.getMaterialGroupId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getEmployeeId().hashCode();
        result = 31 * result + this.getMaterialGroupId().hashCode();
        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
